﻿using System.Text.RegularExpressions;

namespace FixedWidth.Configuration.Rules
{
	class RegexRowDoesntMatchEvaluator
	{
		private Regex _regex;

		public bool IncludeRow(string row)
		{
			return !_regex.IsMatch(row);
		}

		public RegexRowDoesntMatchEvaluator(string pattern)
		{
			_regex = new Regex(pattern);
		}

		public RegexRowDoesntMatchEvaluator(Regex regex)
		{
			_regex = regex;
		}
	}
}
